﻿using System;

namespace Caffeine.Core
{
    /// <summary>
    /// To be implemented by types offering exception handling services to model commands
    /// </summary>
    public interface ICommandExceptionHandler
    {
        /// <summary>
        /// Handles an exception that occurred while executing a command
        /// </summary>
        /// <param name="ex">Exception that occurred</param>
        void HandleExecuteException(Exception ex);

        /// <summary>
        /// Handles an exception that occured while calling CanExecute
        /// </summary>
        /// <param name="ex">Exception that occured</param>
        void HandleCanExecuteException(Exception ex);
    }
}
